package com.jida.hadoop.mr.tools;

import java.io.IOException;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import com.jida.hadoop.mr.tools.*;

public class DxFileUserMapper extends Mapper<LongWritable, Text, Text, IntWritable> {

	protected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, IntWritable>.Context context)
			throws IOException, InterruptedException {
		String[] values=value.toString().split(TProperties.getValue("fileoutsplit"));
		Text k=new Text();
		IntWritable v=new IntWritable(1);
		k.set(values[0].substring(0,6)+"000000000000"+TProperties.getValue("outfilesplit")+values[1]);
		context.write(k, v);
	}
	
}
